package com.example.demo.utils;

public class ConstantUtils {
    //邮箱验证
    public static final int MAX_EMAIL_COUNT = 490; // 每日邮箱使用上限
    public static String currentEmail_1 = "571469694@qq.com";//邮箱
    public static String currentEmail_2 = "xxx@xx.com";//邮箱

    //验证码长度
    public static final int CAPTCHA_LENGTH = 6;
    //比赛口令长度
    public static final int PASSCODE_LENGTH = 6;
    //验证码有效期（分钟）
    public static final int CAPTCHA_EXPIRATION_TIME = 2;
    //登录鉴权常量
    public static final int MAX_ATTEMPT = 5; // 最大尝试次数
    public static final String COOKIE_NAME = "token";
    public static final int COOKIE_MAX_AGE = 60 * 60 * 24 * 7; // 一周
    public static final int STATUS_DISABLED = 1;

    public static final // 构建退出登录时的Cookie字符串
    String outLoginCookieValue = "token=null"
            + "; Path=/"
            + "; HttpOnly=true"
            + "; Secure=false"
            + "; Max-Age=0"
            + "; SameSite=None"; // 假设登录时使用了SameSite=None



    //vip状态
    public static final int EXPIRED = 0;//已过期
    public static final int UNEXPIRED = 1;//未过期

    //禁用常量
    public static final int BAN = 1;

    //比赛截止
    public static final int FINISH = 1;
    public static final int UN_FINISH = 0;


    //权限名称
    public static final String VIP_USER_ROLE = "vip";

    public static final String USER_ROLE = "user";

    public static final String ADMIN_ROLE = "admin";

    //股票常量
    public static final String SELL = "卖出";

    public static final String BUY = "买入";

    public static final String LIMIT_ORDER = "限价";

    public static final String MARKET_ORDER = "市价";
    //微信支付订单状态
    public static final int PENDING_PAYMENT = 0; // 待支付
    public static final int PAYMENT_SUCCESSFUL = 1; // 支付成功
    public static final int PAYMENT_FAILED = 2; // 支付失败
    public static final int CANCELED = 3; // 已取消
    //kafka发送状态
    public static final String SENT = "已发送";
    public static final String FAILED = "发送失败";



}
